package com.rzjm.api.entity;

import cn.hutool.json.JSONArray;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 取货记录
 *
 * @author mr.zhou
 * @email zhouweiNice@163.com
 * @date 2020-12-15 22:36:23
 */
@Data
@TableName("pick_up_record")
public class PickUpRecord implements Serializable {

	private static final long serialVersionUID = 1L;

	//主键
	@TableId(type = IdType.AUTO)
	private Integer id;

	private Integer planId;

	private Integer planInfoId;

	private String planDate;

	/**
	 * 装车类型 0 - 卸车 1 - 装车
	 */
	private Integer recordType;

	private Integer shopId;

	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date beginTime;

	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date endTime;

	private String recordNo;

	private Integer userId;

	private String carNum;

	private String realName;

	private String phoneNum;

	private String wuLiaoName;

	private Double wuLiaoWeight;

	private Double wuLiaoTotalWeight;

	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date createTime;

	/**
	 *  叫号状态  0 -未叫号  1 - 叫号中
	 */
	private Integer callState;

	/**
	 *  状态 0 - 预约成功   1 - 签到成功（叫号成功）  2 - 过号排队中  3 - 取货完成
	 */
	private Integer state;

	/**
	 *  是否取消 0 -未取消 1 - 已取消
	 */
	private Integer isCancel;

	/**
	 *  取消时间
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date cancelTime;

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date appointmentTime;


	@TableField(exist = false)
	private String beginTimeStr;

	@TableField(exist = false)
	private String endTimeStr;

	@TableField(exist = false)
	private String shopName;

	@TableField(exist = false)
	private JSONArray mattersArray;

	@TableField(exist = false)
	private List<PickUpRecordMatter> pickUpRecordMatterList;

}
